

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>存储设备 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="配置 Ceph" href="../ceph-conf/" />
    <link rel="prev" title="配置" href="../" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../">Ceph 存储集群</a></li>
          <li class="breadcrumb-item"><a href="../">配置</a></li>
      <li class="breadcrumb-item active">存储设备</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../../_sources/rados/configuration/storage-devices.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../">Ceph 存储集群</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../">配置</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">存储设备</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#osd">OSD 后端</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-conf/">配置 Ceph</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/">通用选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-network-config">网络</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#id3">监视器</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-osd-config">认证</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#osds">OSDs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#id5">心跳</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-logging-and-debugging">日志记录、调试</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-conf">ceph.conf 实例</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-runtime-config">跑多个集群（已废弃）</a></li>
<li class="toctree-l3"><a class="reference internal" href="../network-config-ref/">网络选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../msgr2/">信使协议 v2</a></li>
<li class="toctree-l3"><a class="reference internal" href="../auth-config-ref/">认证选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mon-config-ref/">监视器选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mon-lookup-dns/">通过 DNS 查询监视器</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mon-osd-interaction/">心跳选项（监视器与 OSD 的的交互）</a></li>
<li class="toctree-l3"><a class="reference internal" href="../osd-config-ref/">OSD 选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mclock-config-ref/">DmClock 配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="../bluestore-config-ref/">BlueStore 配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="../filestore-config-ref/">FileStore 配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="../journal-ref/">日志选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../pool-pg-config-ref/">存储池、归置组和 CRUSH 选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general-config-ref/">常规选项</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../operations/">运维</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../man/">    手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../troubleshooting/">故障排除</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../api/">APIs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="id1">
<h1>存储设备<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h1>
<p>在一套存储集群中有几种 Ceph 守护进程：</p>
<ul class="simple" id="rados-configuration-storage-devices-ceph-osd">
<li><p><strong>Ceph OSDs</strong> （对象存储守护进程）存储着 Ceph 里的大多数数据。
通常，每个 OSD 后面都有一个独立的存储设备，
可以是传统硬盘（ HDD ）或者是固态硬盘（ SSD ）。
OSD 后端也可以是设备的组合：例如，
一个硬盘存储大多数数据、一个 SSD （或者一个 SSD 分区）存储一些元数据。
一套集群里的 OSD 数量通常是一个函数，
参数是要存储的数据量、各个存储设备的容量、
还有冗余的级别和类型（多副本或是纠删码）。</p></li>
<li><p><strong>Ceph Monitor （监视器）</strong>
守护进程管理着集群的关键状态。
这其中有集群成员和认证信息。
小集群仅需要几个 GB 的存储空间来保存监视器数据库；
然而，在大型集群上，监视器数据库的尺寸能达到数十至数百 GB 。</p></li>
<li><p><strong>Ceph Manager （管理器）</strong> 守护进程随监视器守护进程一起运行，
向外部监控和管理系统们提供了另外一套监控手段及其接口。</p></li>
</ul>
<section id="osd">
<span id="rados-config-storage-devices-osd-backends"></span><h2>OSD 后端<a class="headerlink" href="#osd" title="Permalink to this heading"></a></h2>
<p>OSD 有两种管理它们存储着的数据的方法。
从 Luminous 12.2.z 版起，新的默认（也是推荐的）后端是 <em>BlueStore</em> ；
在 Luminous 之前，默认的（且是唯一选项）是 <em>FileStore</em> 。</p>
<section id="bluestore">
<span id="rados-config-storage-devices-bluestore"></span><h3>BlueStore<a class="headerlink" href="#bluestore" title="Permalink to this heading"></a></h3>
<p>BlueStore 是个专用存储后端，是为 Ceph OSD 工作载荷专门设计的，
用于管理磁盘上的数据。 BlueStore 是在支持和管理 FileStore OSD
十年之久的基础上设计的。</p>
<p>BlueStore 的关键功能包括：</p>
<ul class="simple">
<li><p>直接管理存储设备。 BlueStore 使用的是原始块设备或分区。
这样可以避免抽象的中间层（如类似 XFS 的本地文件系统），
它们会降低性能、或增加复杂性。</p></li>
<li><p>用 RocksDB 管理元数据。 RocksDB 的键值数据库是嵌入式的，
可以用于管理内部元数据，包括对象名到磁盘上数据块位置的映射情况。</p></li>
<li><p>完整的数据及其元数据校验和。默认情况下，
写入 BlueStore 的所有数据和元数据都会被一个或多个校验和保护起来。
数据或元数据从磁盘读出来，
没有校验不会返回给用户。</p></li>
<li><p>内联压缩。数据写入磁盘前可以选择性地压缩。</p></li>
<li><p>元数据在多个设备上分级存储。
BlueStore 允许它的内部日志（预写日志）写到一个单独的、
高速设备（像 SSD 、 NVMe 、或 NVDIMM ）上，以提升性能。
如果高速存储的数量足够，
内部元数据可以存储在高速设备上。</p></li>
<li><p>高效的写时复制（ copy-on-write ）。 RBD 和 CephFS 快照功能全靠
BlueStore 实现的一种高效的写时复制 <em>克隆（ clone ）</em> 机制。
这就产生了高效的 I/O ，对于常规快照和纠删码存储池
（它仰仗克隆功能实现高效的二阶段提交）都是如此。</p></li>
</ul>
<p>更多信息请看 <a class="reference internal" href="../bluestore-config-ref/"><span class="doc">BlueStore 配置参考</span></a> 和
<a class="reference internal" href="../../operations/bluestore-migration/"><span class="doc">迁移到 BlueStore</span></a> 。</p>
</section>
<section id="filestore">
<h3>FileStore<a class="headerlink" href="#filestore" title="Permalink to this heading"></a></h3>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Filestore 在 Reef 版已经废弃，并且不会再支持。</p>
</div>
<p>FileStore 是 Ceph 存储对象的老方法。
它依赖于标准文件系统（通常是 XFS ）和用于元数据的键值数据库（以前是 LevelDB ，现在是 RocksDB ）
组合。</p>
<p>FileStore 久经考验而且在生产环境下广泛应用。
然而，由于其总体设计问题，遇到了很多性能不足，
以及用传统文件系统存储对象数据时的可靠性。</p>
<p>虽说 FileStore 可以利用大多数兼容 POSIX 的文件系统
（包括 btrfs 和 ext4 ），我们还是只推荐 Ceph 搭配 XFS 。
btrfs 和 ext4 都有已知的缺陷和不足，
使用它们可能会导致数据丢失。默认情况下，
Ceph 的所有部署工具都用 XFS 。</p>
<p>更多信息请看 <a class="reference internal" href="../filestore-config-ref/"><span class="doc">filestore 配置参考</span></a> 。</p>
</section>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../" class="btn btn-neutral float-left" title="配置" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../ceph-conf/" class="btn btn-neutral float-right" title="配置 Ceph" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>